#while
a = int(input('请输入一个数字: '))
while a > 0:
    print(f'a={a}')
    a -= 1

num = 1
sum = 0
while num <= 100:
    sum += num
    num += 1
print(sum)

num = 1
result = 1
while num <= 5:
    result *= num
    num += 1
print(result)

num = int(input('请输入一个整数: '))
result = 0
while num > 0:
    tmp = 1
    tobe = num
    while tobe > 0:
        tmp *= tobe
        tobe -= 1
    result += tmp
    num -= 1
print(result)